package com.wq.wrongquestion.serviceimpl.bio;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.wq.wrongquestion.entity.bio.BiologyEntity;
import com.wq.wrongquestion.mapper.bio.BiologyMapper;
import com.wq.wrongquestion.service.bio.BiologyService;

@Component
public class BiologyServiceImpl implements BiologyService{

    @Autowired
    public BiologyMapper BiologyMapper;
    @Override
    @Transactional
    public String getBiologyZjnm(String zjID) {
        String zjNm=BiologyMapper.getBiologyZjnm(zjID);
        return zjNm;
    }
    @Override
    @Transactional
    public List<String> getBiologyZjID() {
       List<String> allZjID=BiologyMapper.getBiologyZjID();
       return allZjID;
    }
    @Override
    @Transactional
    public List<String> getBiologyZj() {
        List<String> zjInfo=BiologyMapper.getBiologyZj();
        return zjInfo;
    }
    @Override
    @Transactional
    public void insBiology(BiologyEntity BiologyEntity) {
        BiologyMapper.insBiology(BiologyEntity);
    }
    @Override
    @Transactional
    public PageInfo<BiologyEntity> getBiology(Integer pageNumer,Integer pageSize,BiologyEntity BiologyEntity) {
        PageHelper.startPage(pageNumer, pageSize);
        List<BiologyEntity> Biology=BiologyMapper.getBiology(BiologyEntity);
        PageInfo<BiologyEntity> pageBiology=new PageInfo<>(Biology);
        return pageBiology;
    }

    @Override
    @Transactional
    public List<BiologyEntity> getBiologyByID(Integer id) {
        List<BiologyEntity> Biology=BiologyMapper.getBiologyByID(id);
        return Biology;
    }
    @Override
    @Transactional
    public Integer updBiology(BiologyEntity BiologyEntity) {
        return BiologyMapper.updBiology(BiologyEntity);
    }
    @Override
    @Transactional
    public Integer delBiology(Integer id) {
        return BiologyMapper.delBiology(id);
    }
    
}